const jsdom = require('jsdom')
const { host } = require('../config')
const { JSDOM } = jsdom

const resourceLoader = new jsdom.ResourceLoader({
  userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
})
const dom = new JSDOM('', {
  url: `${host}/mainProject/login.html`,
  resources: resourceLoader
})

global.window = dom.window
global.document = window.document
global.navigator = window.navigator
window.isNode = true